package com.guangyunl.a_permission;
//同类中四种权限修饰符都能访问
public class MyClass {
    private String name01 = "private = name01"; //私有
    protected String name02 = "protected = name02"; //受保护的
    String name03 = "default = name03"; //default默认
    public String name04 = "public = name04"; //公共的

     public void method(){
         System.out.println(name01);
         System.out.println(name02);
         System.out.println(name03);
         System.out.println(name04);
     }

    public static void main(String[] args) {
        MyClass myClass = new MyClass();
        myClass.method();
    }
}
/*
private = name01
protected = name02
default = name03
public = name04
 */